package com.wpre.lotterysystem.controller.param;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import java.io.Serializable;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-12-21
 * Time: 15:26
 */
@Data
public class CreateActivityParam implements Serializable {
    //活动名称
    @NotBlank(message = "活动名称不能为空")
    private String activityName;

    //描述信息
    @NotBlank(message = "活动描述信息不能为空")
    private String description;


    @NotEmpty(message = "活动关联的奖品列表不能为空")
    @Valid      //NotEmpty只能判断List是否为空,不能判断List里面的CreatePrizeByActivityParam是否为空,所以要加上Valid
    //活动关联的奖品列表,CreatePrizeByActivityParam是关联的奖品信息
    private List<CreatePrizeByActivityParam> activityPrizeList;


    @NotEmpty(message = "活动关联的人员列表不能为空")
    @Valid
    //活动关联的人员列表
    private List<CreateUserByActivityParam> activityUserList;

}
